<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<h:head></h:head>

<h:body>
	<p:panel>
		<h1>Playground for everything...</h1>
		<p>Remove before deployment!</p>

		<h:form id="dayTextForm">
			<h:panelGrid columns="2">
				<h:outputText value="Wochentag: " />
				<p:selectOneMenu value="#{backingBean.myInt}">
					<!-- onchange="#{backingBean.onChange}">  -->
					<f:selectItem itemLabel="Sonntag" itemValue="1" />
					<f:selectItem itemLabel="Montag" itemValue="2" />
					<f:selectItem itemLabel="Dienstag" itemValue="3" />
					<f:selectItem itemLabel="Mittwoch" itemValue="4" />
					<f:selectItem itemLabel="Donnerstag" itemValue="5" />
					<f:selectItem itemLabel="Freitag" itemValue="6" />
					<f:selectItem itemLabel="Samstag" itemValue="7" />
					<p:ajax listener="#{backingBean.onChange}"  update="dayTextForm"/>
				</p:selectOneMenu>

				<h:outputText value="Überschrift:" />
				<p:inputText value="#{backingBean.myString}" />

				<p:commandButton value="Speichern" icon="ui-icon-disk"
					actionListener="#{backingBean.doSomething}" ajax="true" />

			</h:panelGrid>
		</h:form>
	</p:panel>
</h:body>
</html>